<template>
  <div>
    <h1>app</h1>
    <h1>{{$store.state.count}}</h1>
    <button @click="add">访问mutations当中的用法</button>
    <button @click="decrementAct">组件触发actions</button>
    <h1>{{ $store.getters.evenOrOdd }}</h1>

    <hr />
    <h1>{{ $store.state.yangyang.info }}</h1>
    <button @click="change">改动洋洋为思哲</button>
  </div>
</template>

<script>
  export default {
    methods:{
      add(){
        this.$store.commit("add");
      },
      decrementAct(){
        this.$store.dispatch('decrementAct');
      },
      change(){
        this.$store.commit('change');
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>